#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>

#include <ncurses.h>

#define FIFO_NAME_SIZE 100
#define MESSAGE_SIZE 300
#define TRANSACTION_SIZE 300
#define CLIENT_FIFO_NAME "../FIFOs/FIFO_%u"
#define SERVER_FIFO_NAME "../FIFOs/FIFO_TRANSACTIONS"

//#######################################
//#
//# Definition des structures
//#
struct Info_FIFO_Transaction
{				
	unsigned int pid_client; 		
	char transaction[TRANSACTION_SIZE];					
};	

struct Server_Response
{	
	char ack;				
	char message[MESSAGE_SIZE];					
};							 
	
//#######################################
//#
//# Definition des fonctions
//#
void Mkfifo(const char *path, mode_t mode);
int Open_fifo(const char *path, int flags);
int createFifo(char fifoName[FIFO_NAME_SIZE]);
